package com.dhcc.rabbitmq.base.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 
* <p>标题: HelloReceiver.java</p>
* <p>业务描述:消息接收者（消费者）</p>
* <p>公司:东华软件股份公司</p>
* <p>版权:dhcc2013</p>
* @author 胡凯
* @date 2019年7月29日
* @version V1.0
 */
@Component
//@RabbitListener(queues = "hello")
public class HelloReceiver {

    @RabbitHandler
    @RabbitListener(queues = "hello")
    public void process(String hello){
        System.out.println("Receiver1 : " + hello);
    }


    @RabbitHandler
    @RabbitListener(queues = "hello")
    public void process2(String hello){
        System.out.println("Receiver2 : " + hello);
    }
}
